from pymud import PyMudApp, Session, Trigger
from functools import partial
import json
import os
import sys

PLUGIN_NAME    = "lib_init"

PLUGIN_DESC = {
    "VERSION" : "1.0.0",
    "AUTHOR"  : "spirytus",
    "RELEASE_DATE"  : "2024-03-17",
    "DESCRIPTION" : "添加依赖库PATH"
}

# os.path.abspath()


def PLUGIN_PYMUD_START(app: PyMudApp):
    lib_path = os.path.dirname(os.path.dirname(__file__))
    sys.path.append(lib_path)
    app.set_status(f"插件{PLUGIN_NAME}已加载! 加载依赖库PATH{lib_path}")
    pass

def PLUGIN_SESSION_CREATE(session: Session):
    pass

def PLUGIN_SESSION_DESTROY(session: Session):
    pass